import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/test',
      name: 'test',
      component: () => import('@/views/home/test/test.vue')
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('@/views/search/index.vue')
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/home/home.vue')
    },
    {
      path: '/introduction/:menuId',
      name: 'introduction',
      component: () => import('@/views/introduction/index.vue'),
      props: true
    },
    {
      path: '/datum/:menuId',
      name: 'datum',
      component: () => import('@/views/datum/index.vue'),
      props: true
    },
    {
      path: '/posts',
      name: 'posts',
      component: () => import('@/views/posts/index.vue')
    },
    {
      path: '/downloads',
      name: 'downloads',
      component: () => import('@/views/datum/downloads.vue')
    },
  ]
})
